Skip to content

[#161980170] Removes 505 error for invalid user/parcel id#43

Merged
ipaullly merged 66 commits intodevelopfrom
bg-id-validation-161980170
Nov 15, 2018
Merged

[#161980170] Removes 505 error for invalid user/parcel id#43
ipaullly merged 66 commits intodevelopfrom
bg-id-validation-161980170

Conversation

@ipaullly
Copy link
Owner

@ipaullly ipaullly commented Nov 15, 2018

What does this PR do?

catches the instances where a user may submit a wrong id when canceling or retrieving orders by a specific user_id

Description of Task to be completed?

  • Define a method in parcels model to check whether id passed into it exists in the database
  • add logic to view functions to raise an error message when invalid id is passed through the URL

How should this be manually tested?

access the API documentation at https://documenter.getpostman.com/view/4014888/RzZCCwun, press the Run in Postman at the top right corner of the window. Try to send the endpoints that require a user/parcel id with an invalid id and an error message appears promptly

@codecov
Copy link

codecov bot commented Nov 15, 2018

Codecov Report

❗ No coverage uploaded for pull request base (develop@0832a2a). Click here to learn what that means.
The diff coverage is 84.44%.

Impacted file tree graph

@@           Coverage Diff           @@
##             develop   #43   +/-   ##
=======================================
  Coverage           ?   85%           
=======================================
  Files              ?    11           
  Lines              ?   280           
  Branches           ?    17           
=======================================
  Hits               ?   238           
  Misses             ?    37           
  Partials           ?     5
Impacted Files Coverage Δ
app/api/v1/__init__.py 100% <100%> (ø)
app/tests/v1/test_login.py 100% <100%> (ø)
app/auth/v1/__init__.py 100% <100%> (ø)
app/api/v1/models.py 100% <100%> (ø)
app/tests/v1/test_register.py 100% <100%> (ø)
app/tests/v1/test_parcels.py 100% <100%> (ø)
app/utilities/validation_functions.py 36.36% <36.36%> (ø)
app/auth/v1/views.py 58.97% <58.97%> (ø)
app/tests/v1/test_edgecases.py 64% <64%> (ø)
app/auth/v1/models.py 84.61% <84.61%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0832a2a...b9262ee. Read the comment docs.

@ipaullly ipaullly merged commit b9262ee into develop Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant